<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content" style="padding:0px 15px;">
        <!-- Main content -->
        <div class="container-fluid">
            <div class="pull-right">
                <a href="javascript:history.go(-1)" data-toggle="tooltip" title="" class="btn btn-default" data-original-title="返回"><i class="fa fa-reply"></i></a>
            </div>
            <div class="panel panel-default">           
                <div class="panel-body ">   
                   	<ul class="nav nav-tabs">
                        <foreach name="group_list" item="vo" key="k">
                     		<li <if condition="$k eq 'shop_info'">class="active"</if>><a href="javascript:void(0)" data-url="{:U('System/index',array('inc_type'=>$k))}" data-toggle="tab" onclick="goset(this)">{$vo}</a></li>
                     	</foreach>                           
                    </ul>
                    <!--表单数据-->
                    <form method="post" id="handlepost" action="{:U('System/handle')}">                    
                        <!--通用信息-->
                    <div class="tab-content" style="padding:20px 0px;">                 	  
                        <div class="tab-pane active" id="tab_tongyong">                           
                            <table class="table table-bordered">
                                <tbody>     
                                <tr>
                                    <td class="col-sm-2">网站备案号：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="record_no" value="{$config.record_no}" >
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr>                                
                                <tr>
                                    <td class="col-sm-2">网站名称：</td>
                                    <td class="col-sm-8">
                                        <input type="text" class="form-control" name="store_name" value="{$config.store_name}" >
                                        <span id="err_attr_name" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr> 
                                <tr>
                                    <td>网站logo：</td>
                                    <td>
                         		 		<input type="text" id="store_logo" class="input-sm" name="store_logo" value="{$config.store_logo}" >
                         		 		<input type="button" class="button" onClick="GetUploadify(1,'store_logo','logo','')"  value="上传logo"/>                                
                                    </td>
                                </tr>   
                                <tr>
                                    <td>网站标题：</td>
                                    <td >
                                        <input type="text" class="form-control" name="store_title" value="{$config.store_title}" >
                                        <span id="err_type_id" style="color:#F00; display:none;"></span>                                        
                                    </td>
                                </tr>  
                                <tr>
                                    <td>网站描述：</td>
                                    <td>
                                        <input type="text" class="form-control" name="store_desc" value="{$config.store_desc}" >
                                    </td>
                                </tr>  
                                <tr>
                                    <td>网站关键字：</td>
                                    <td>
                                        <input type="text" class="form-control" name="store_keyword" value="{$config.store_keyword}" >
                                    </td>
                                </tr> 
                                <tr>
                                <td>联系人：</td>
                                 <td>
                                     <input type="text" class="form-control" name="contact" value="{$config.contact}" >
                                 </td>
                                </tr> 
                                <tr>
                                <td>联系电话：</td>
                                  <td>
                                        <input type="text" class="form-control" name="phone" value="{$config.phone}" >
                                  </td>
                                </tr> 
                               <tr>
                                <td>联系手机：</td>
                                  <td>
                                        <input type="text" class="form-control" name="mobile" value="{$config.mobile}" >
                                  </td>
                                </tr> 
                               <tr>
                                	<td>联系地址：</td>
                                	<td colspan="2">
                                	   <div class="col-xs-2">
                                        <select onchange="get_city(this)" id="province" name="province" class="form-control" style="margin-left:-15px;">
                                            <option  value="0">选择省份</option>
                                            <volist name="province" id="vo">
                                                <option value="{$vo.id}" <if condition="$config[province] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div>   
                                        <div class="col-xs-2">                                        
                                        <select onchange="get_area(this)" id="city" name="city" class="form-control">
                                            <option value="0">选择城市</option>
                                            <volist name="city" id="vo">
                                                <option value="{$vo.id}" <if condition="$config[city] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div>   
                                        <div class="col-xs-2">                                        
                                        <select id="district" name="district" class="form-control">
                                            <option value="0">选择区域</option>
                                            <volist name="area" id="vo">
                                                <option value="{$vo.id}" <if condition="$config[district] eq $vo[id]">selected</if>>{$vo.name}</option>
                                            </volist>
                                        </select>
                                        </div> 
                                        <div class="col-xs-4">
                                        	<input type="text" placeholder="详细地址" class="form-control" name="address" value="{$config.address}">
                                        </div>      
                                	</td>
                                </tr>
                                <tr>
                                <td>客服QQ1：</td>
                                 <td>
                                        <input type="text" class="form-control" name="qq" value="{$config.qq}" >
                                 </td>
                                </tr>
                                <tr>
                                <td>客服QQ2：</td>
                                 <td>
                                        <input type="text" class="form-control" name="qq2" value="{$config.qq2}" >
                                 </td>
                                </tr>
                                <tr>
                                <td>客服QQ3：</td>
                                 <td>
                                        <input type="text" class="form-control" name="qq3" value="{$config.qq3}" >
                                 </td>
                                </tr>
                                </tbody> 
                                <tfoot>
                                	<tr>
                                	<td><input type="hidden" name="inc_type" value="{$inc_type}"></td>
                                	<td class="text-right"><input class="btn btn-primary" type="button" onclick="adsubmit()" value="保存"></td></tr>
                                </tfoot>                               
                                </table>
                        </div>                           
                    </div>              
			    	</form><!--表单数据-->
                </div>
            </div>
        </div>
    </section>
</div>
<script>
function adsubmit(){
	/*
	var site_url = $('input[name="site_url"]').val();	
	var urlReg = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\w \.-]*)*$/;  
	if(!urlReg.exec(site_url))
	{
	   alert('网站域名格式必须是 http://www.xxx.com');	
	   return false;
	}
	*/		
	$('#handlepost').submit();
}

$(document).ready(function(){
	//get_province();
});

function goset(obj){
	window.location.href = $(obj).attr('data-url');
}
</script>
</body>
</html>